:- use_module(library('http/thread_httpd')).
:- use_module(library('http/http_dispatch')).
:- use_module(library('http/html_write')).
%:- use_module(library(http_client)).
%:- use_module(library(http/http_parameters)).

server(Port) :-
       %http_server(http_dispatch, [port(Port)]).
       http_server(reply, [port(Port)]).

%:- http_handler('/', root, []).
%:- http_handler('/reply', reply, []).
/*
root(_Request) :-
        reply_html_page([ title('Demo server')
                        ],
                        [ p(a(href('reply'), click))
                        ]).
*/
reply(Request) :-
        http_reply_file('request.xml',[],Request).

?- server(5000).
